.class final Lcom/ninesky/browser/cm;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private synthetic a:Lcom/ninesky/browser/DownloadActivity;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/DownloadActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 6

    const/4 v5, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    iget-object v1, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v1}, Lcom/ninesky/browser/DownloadActivity;->d(Lcom/ninesky/browser/DownloadActivity;)J

    move-result-wide v1

    const-wide/16 v3, -0x1

    cmp-long v3, v1, v3

    if-eqz v3, :cond_0

    invoke-virtual {v0}, Lcom/ninesky/browser/DownloadActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    sget-object v3, Lcom/ninesky/browser/provider/downloads/e;->a:Landroid/net/Uri;

    invoke-static {v3, v1, v2}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1, v5, v5}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->e(Lcom/ninesky/browser/DownloadActivity;)V

    iget-object v0, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->f(Lcom/ninesky/browser/DownloadActivity;)V

    const/4 v0, 0x4

    new-array v0, v0, [Lcom/ninesky/widget/g;

    const/4 v1, 0x0

    iget-object v2, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v2}, Lcom/ninesky/browser/DownloadActivity;->c(Lcom/ninesky/browser/DownloadActivity;)Lcom/ninesky/widget/l;

    move-result-object v2

    aput-object v2, v0, v1

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v2}, Lcom/ninesky/browser/DownloadActivity;->g(Lcom/ninesky/browser/DownloadActivity;)Lcom/ninesky/widget/l;

    move-result-object v2

    aput-object v2, v0, v1

    const/4 v1, 0x2

    iget-object v2, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v2}, Lcom/ninesky/browser/DownloadActivity;->h(Lcom/ninesky/browser/DownloadActivity;)Lcom/ninesky/widget/l;

    move-result-object v2

    aput-object v2, v0, v1

    const/4 v1, 0x3

    iget-object v2, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    invoke-static {v2}, Lcom/ninesky/browser/DownloadActivity;->i(Lcom/ninesky/browser/DownloadActivity;)Lcom/ninesky/widget/l;

    move-result-object v2

    aput-object v2, v0, v1

    invoke-static {v0}, Lcom/ninesky/browser/DownloadActivity;->a([Lcom/ninesky/widget/g;)V

    iget-object v0, p0, Lcom/ninesky/browser/cm;->a:Lcom/ninesky/browser/DownloadActivity;

    const-string v1, "Download"

    const-string v2, "Clear"

    invoke-static {v0, v1, v2}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method
